#ifndef _SPIRAM_H
#define _SPIRAM_H

#include <stdint.h>
#include <stddef.h>

#include "SPI_ADC.h"
#include "Sensor_Sampling.h"

#define TXBUFLength 512
#define RXBUFLength 516

#define SATRTWRITEADDR 0X00

typedef struct
{
    uint32_t WriteAddr;//记录当前写入地址
    uint32_t ReadAddr;//读取地址
    uint8_t SendBUF[TXBUFLength];
    uint8_t ReadBUF[RXBUFLength];
} VTI7064BUF;

#define VTI7064_JedecDeviceID		0x9F 
#define VTI7064_ReadData			0x03 
#define VTI7064_PageProgram		    0x02 

#define VTI7064_SENDMINLEN          4
#define VTI7064_DEVICEIDLEN         3

extern void SPIRAM_Init(void);
extern void SPIRAM_ThreadStart(void);

extern bool Get_SampleSatus(void);
extern bool Read_SRAM(uint32_t addr,uint32_t datalen);

extern uint8_t* Read_OverLengthData(uint16_t Count,uint16_t *datalen);
#endif

